package com.hl.sfzy.mapper;

import com.hl.sfzy.entity.Course;
import com.hl.sfzy.entity.CourseType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Mystic
* @description 针对表【course(课程表)】的数据库操作Mapper
* @createDate 2025-03-10 10:19:26
* @Entity com.hl.sfzy.entity.Course
*/
@Mapper
public interface CourseMapper {

    //根据id删除
    int deleteByPrimaryKey(Long id);
    //新增
    int insert(Course record);

    //根据id查询
    Course selectByPrimaryKey(Long id);

    //修改
    int updateByPrimaryKey(Course course);
    //批量删除
    int deleteBatch(List<Long> ids);

    //查询所有
    List<Course> select(int pageNum, int pageSize);
    //分页查询
    List<Course> selectByPage(@Param("pageNum") int pageNum,
                                  @Param("pageSize") int pageSize,
                                  @Param("course") Course course);
    //课程和咨询师的关联查询
    List<Course> selectCourseConsultants(Long id);
    List<Course> selectByConsultantId(Long id);

}
